#!/usr/bin/env bash

foo="abc,bbb,ccc"
bar="xxx:yyy:zzz"

IFS=',' read -r -a arr1 <<< "$foo"

count=1
for ele in ${arr1[@]}; do 
	echo $ele
	echo $count
	count=$[ $count + 1]
done

